home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 6 / QRZ Ham Radio Callsign Database - Volume 6.iso / mac / files / finland / ddlcpack.lzh / RAWHDLC.C < prev    next >
C/C++ Source or Header  |  1993-01-05  |  1KB  |  43 lines

  1. /*
  2.  * Raw (==HDLC) encoding of packet datagrams on an interface which can
  3.  *              do it.  - mea@utu.fi  OH1MQK  31-May-1992
  4.  */
  5. #include "global.h"
  6. #include "mbuf.h"
  7. #include "proc.h"
  8. #include "iface.h"
  9. #include "internet.h"
  10. #include "ip.h"
  11. #include "slhc.h"
  12. #include "n8250.h"
  13. #include "asy.h"
  14. #include "pktdrvr.h"
  15. #include "socket.h"
  16. #include "devparam.h"
  17. #include "rawhdlc.h"
  18. #include "trace.h"
  19.  
  20. /* Send IP datagram to HDLC -- that is, send to device output routine.. */
  21. int
  22. hdlc_send(bp,ifp,gateway,tos)
  23. struct mbuf *bp;    /* Buffer to send */
  24. struct iface *ifp;    /* Pointer to interface control block */
  25. int32 gateway;        /* Ignored (HDLC is for point-to-point) */
  26. int tos;
  27. {
  28.     return (*ifp->output)(ifp,NULLCHAR,NULLCHAR,0,bp);
  29. }
  30.  
  31.  
  32. /* Send a packet to HDLC -- that is, send to RAW device output routine.. */
  33. int
  34. hdlc_output(ifp,dest,source,protocol,data)
  35. struct iface *ifp;    /* Pointer to interface control block */
  36. char *dest;        /* Dest addr (ignored; point-to-point) */
  37. char *source;        /* Source addr (ignored; point-to-point) */
  38. int16 protocol;        /* Protocol Type field */
  39. struct mbuf *data;    /* Actual data to be sent */
  40. {
  41.     return (*ifp->raw)(ifp,data);
  42. }
  43.